import Vue, {AsyncComponent } from 'vue'
import Router, {RouteConfig} from 'vue-router'

const homePage:AsyncComponent = (): any => import('../views/HomePage.vue')
const EditPage:AsyncComponent = (): any => import('../views/EditPage.vue')

Vue.use(Router)

const routes: RouteConfig[] = [
    {
        path: '/',
        redirect: '/homePage'
    },
    {
        path: '/homePage',
        name: 'homePage',
        component: homePage
    },
    {
        path: '/EditPage',
        name: 'EditPage',
        component: EditPage
    }
]

const router: Router =  new Router({
    routes
})

export default router